package com.tcp2.net;

import com.google.common.collect.Maps;

import java.util.concurrent.ConcurrentMap;

/**
 * Author: 杨俊辉
 * Time: 2014-09-24 16:21
 * Copyright (C) 2014 Xiamen Yaxon Networks CO.,LTD.
 */
public class PlatformMap {

    /**
     * 下级接入政府平台Map
     */

    //获取企业平台Channlel通道
    private static ConcurrentMap<Integer, PlatformChannel> plat2channelMap = Maps.newConcurrentMap();
    //获取企业平台-> 政府平台的主链路
    private static ConcurrentMap<Integer, MasterLinkHandler> plat2govMap = Maps.newConcurrentMap();
    //获取政府平台-> 企业平台的从链路
    private static ConcurrentMap<Integer, SlaveLink> gov2platMap = Maps.newConcurrentMap();

    public static ConcurrentMap<Integer, PlatformChannel> getPlat2channelMap() {
        return plat2channelMap;
    }

    public static void setPlat2channelMap(ConcurrentMap<Integer, PlatformChannel> plat2channelMap) {
        PlatformMap.plat2channelMap = plat2channelMap;
    }

    public static ConcurrentMap<Integer, MasterLinkHandler> getPlat2govMap() {
        return plat2govMap;
    }

    public static void setPlat2govMap(ConcurrentMap<Integer, MasterLinkHandler> plat2govMap) {
        PlatformMap.plat2govMap = plat2govMap;
    }

    public static ConcurrentMap<Integer, SlaveLink> getGov2platMap() {
        return gov2platMap;
    }

    public static void setGov2platMap(ConcurrentMap<Integer, SlaveLink> gov2platMap) {
        PlatformMap.gov2platMap = gov2platMap;
    }
}
